package com.yanqu.road.logic.bussiness.cross;


import com.yanqu.road.entity.crossorewar.CrossOrePitInfo;
import com.yanqu.road.entity.crossorewar.CrossOreWarNotice;
import com.yanqu.road.entity.crossorewar.CrossOreWarRecord;
import com.yanqu.road.entity.crossorewar.CrossUserOrePit;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class CrossOreWarBussiness {

    //获取最大的更新id
    public static long getMaxUpdateIndex(int activityId) {
        return DaoHelper.getCrossOreWarDaoImpl().getMaxUpdateIndex(activityId);
    }

    //获取跨服的用户坑位信息
    public static Map<Integer, CrossUserOrePit> getCrossUserOrePitMap(int activityId,int groupId) {
        return DaoHelper.getCrossOreWarDaoImpl().getCrossUserOrePitMap(activityId,groupId);
    }

    public static boolean initCrossUserOrePitMap(Map<Integer, CrossOrePitInfo> orePitInfoMap, Map<Integer, CrossUserOrePit> userOrePitMap,int groupId) {
        return DaoHelper.getCrossOreWarDaoImpl().initCrossUserOrePitMap(orePitInfoMap, userOrePitMap,groupId);
    }

    public static boolean updateCrossUserOrePitList(List<CrossUserOrePit> crossUserOrePits) {
        return DaoHelper.getCrossOreWarDaoImpl().updateCrossUserOrePitList(crossUserOrePits);
    }

    public static Map<Long, Map<Long, List<CrossOreWarRecord>>> getCrossOreWarRecordMap(int activityId,int groupId) {
        return DaoHelper.getCrossOreWarDaoImpl().getCrossOreWarRecordMap(activityId,groupId);
    }

    public static Map<Long, List<CrossOreWarRecord>> getCrossOreWarRecordMap(int activityId,long serverId) {
        return DaoHelper.getCrossOreWarDaoImpl().getCrossOreWarRecordMapServer(activityId,serverId);
    }

    public static boolean addCrossOreWarRecordList(List<CrossOreWarRecord> crossOreWarRecords){
        return DaoHelper.getCrossOreWarDaoImpl().addCrossOreWarRecordList(crossOreWarRecords);
    }

    public static LinkedList<CrossOreWarNotice> getCrossOreWarNoticeList(int activityId, int groupId,int maxCount) {
        return DaoHelper.getCrossOreWarDaoImpl().getCrossOreWarNoticeList(activityId,groupId,maxCount);
    }

    public static boolean addCrossOreWarNoticeList(List<CrossOreWarNotice> noticeList) {
        return DaoHelper.getCrossOreWarDaoImpl().addCrossOreWarNoticeList(noticeList);
    }
}
